#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>
int main()
{
	/*char arr1[] = "abcdefg";
	char arr2[] = "*******";
	int left = 0;
	int right = strlen(arr1) - 1;
	while (left <= right)
	{
		arr2[left] = arr1[left];
		arr2[right] = arr1[right];
		left++;
		right--;
		printf("%s\n", arr2);
	}*/

	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int left = 0;
	int right = sizeof(arr) / sizeof(arr[0]) - 1;
	
	int k = 0;
	scanf("%d", &k);
	while (left <= right)
	{
		int mid = (left + right) / 2;
		if (k > arr[mid])
			left = mid + 1;
		if (k < arr[mid])
			right = mid - 1;
		if (k == arr[mid])
		{
			printf("%d", mid);
			break;
		}
	}
	return 0;
}